{include file="public_head" /}
<!-- upload -->
<link href="__STATIC__/css/uploads.css" rel="stylesheet">
<!-- Select2 -->
<link href="__STATIC__/css/select/select2.min.css" rel="stylesheet">


<body class="nav-md">

<div class="container body">

  <div class="main_container">

    {include file="public_sidebar,public_nav" /}
    <!-- page content -->
    <div class="right_col" role="main">
      <div class="">

        <div class="page-title">
          <div class="title_left">
            <h3>会员管理</h3>
          </div>
        </div>
        <div class="clearfix"></div>
        <div class="row">
          <div class="col-md-12 col-sm-12 col-xs-12">
            <div class="x_panel">
              <div class="x_title">
                <h2>{$mate_title}
                  <!--<small>different form elements</small>-->
                </h2>
                <ul class="nav navbar-right panel_toolbox">
                  <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                  </li>
                  <li><a class="close-link"><i class="fa fa-close"></i></a>
                  </li>
                </ul>
                <div class="clearfix"></div>
              </div>
              <div class="x_content">
                <br/>
                <form class="form-horizontal form-label-left" action="" method="post" id="registerForm">
                  <div class="form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">我的级别：</label>
                    <div class="col-md-6 col-sm-6 col-xs-12">
                       <label class="radio_box">
                        <input type="radio" name="is_vip" id="status_1" class="cartradio"
                               value="1"
                               datatype="*"
                               nullmsg="请选择会员状态！" errormsg="请选择会员状态！"
                               {eq name='item.is_vip|default=""' value='1' }
                               checked
                               {/eq}
                        >&nbsp;&nbsp;
                        <label for="status_1"></label>
                        <span>普通会员</span>
                        &nbsp;&nbsp;
                    </label>
                        <label class="radio_box">
                            <input type="radio" name="is_vip" id="status_2" class="cartradio"
                                   value="2"
                                   datatype="*"
                                   nullmsg="请选择会员状态！" errormsg="请选择会员状态！"
                                   {eq name='item.is_vip|default=""' value='2' }
                                   checked
                                   {/eq}
                            >&nbsp;&nbsp;
                            <label for="status_2"></label>
                            <span>股东会员</span>
                            &nbsp;&nbsp;
                        </label>

                    </div>
                  </div>
                  <div class="form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">我的推荐股东：</label>
                    <div class="col-md-8 col-sm-8 col-xs-12">
                      <select name="member_id[]" class="select2_multiple form-control"
                              multiple="multiple"
                              style="width: 650px;" tabindex="-1"
                              datatype="*"
                              nullmsg="请选择推荐会员！" errormsg="请选择推荐会员！"
                      >
                        <option
                                value="0"
                                {eq name='item.member_id|default=""' value='0'}selected{/eq}
                        >
                        无推荐
                        </option>
                        {volist name="member_list" id="list"}
                        <option
                                {in name='list.id' value='$item.member_id|default=""'}selected{/in}
                        value="{$list.id}"
{php}if(in_array($list['id'],$array_m)) echo 'disabled="disabled"';
                          if(!in_array($list['id'],$array_m_all) && $list['is_vip'] == 2) echo 'disabled="disabled"';
                          {/php}
                        >
                        {$list.username}(id:{$list.referrals_id}-级别:{$list.level}
                        </option>
                        {/volist}
                      </select>
                    </div>
                  </div>


                  <div class="form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">头像：</label>
                    <div class="col-md-6 col-sm-6 col-xs-12" style="margin-top: 10px;">
                      <img src="/{$item.avatar}" class="avatar" style="width: 60px;height: 60px;" onerror="this.src='__STATIC__/images/user.png' ">
                    </div>
                  </div>
                  <div class="divider-dashed"></div>


                  <div class="form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">手机号：</label>
                    <div class="col-md-6 col-sm-6 col-xs-12" style="margin-top: 10px;">
                      {$item.username|default=''}
                    </div>
                  </div>
                  <div class="divider-dashed"></div>

                  <div class="form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">昵称：</label>
                    <div class="col-md-6 col-sm-6 col-xs-12" style="margin-top: 10px;">
                      {$item.nickname|default=''}
                    </div>
                  </div>
                  <div class="divider-dashed"></div>

                  <div class="form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">余额：</label>
                    <div class="col-md-6 col-sm-6 col-xs-12" style="margin-top: 10px;">
                      {$item.balance}
                      <!--<a href="javascript:member_rechage({$item.id});" class="btn btn-primary btn-xs" style="margin-left: 40px;margin-top: -5px;"><i class="fa fa-folder"></i> 充余额 </a>-->
                    </div>

                  </div>
                  <div class="divider-dashed"></div>

                  <div class="form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">积分：</label>
                    <div class="col-md-6 col-sm-6 col-xs-12" style="margin-top: 10px;">
                      {$item.integral}
                      <!--<a href="javascript:member_integral({$item.id});" class="btn btn-primary btn-xs" style="margin-left: 60px;margin-top: -5px;"><i class="fa fa-folder"></i> 充积分 </a>-->
                    </div>

                  </div>
                  <div class="divider-dashed"></div>


                  <div class="form-group">
                    <div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3">
                      <button type="submit" class="btn btn-primary">提交</button>
                      <a type="reset" class="btn btn-success" onclick="history.go(-1)">返回</a>
                    </div>
                  </div>

                </form>
              </div>
            </div>
          </div>
        </div>


      </div>
      <!-- /page content -->

    </div>

  </div>
</div>

{include file="public_foot" /}
<script src="__STATIC__/js/Validform_v5.3.2_min.js"></script>
<!--select-->
<script src="__STATIC__/js/select/select2.full.min.js"></script>
<!-- public -->
<script src="__STATIC__/js/public.js"></script>
<!-- layer -->
<script src="__STATIC__/js/layer.js"></script>
<script type="text/javascript">
    // validform
    $(function () {

        $.Tipmsg.r = null;

        var showmsg = function (msg) {
            //假定你的信息提示方法为showmsg， 在方法里可以接收参数msg，当然也可以接收到o及cssctl;
            alert(msg);
        }
        $("#registerForm").Validform({
            tiptype: function (msg) {
                layer.msg(msg);
            },
            tipSweep: true
        });

        // upload
        new uploadPreview({UpBtn: "up_img", DivShow: "imgdiv", ImgShow: "imgShow"});

        // select2
        $(".select2_single").select2({
            placeholder: "请选择分类",
            allowClear: true
        });

    })
    $(".select2_multiple").select2({
        maximumSelectionLength: 0,
        placeholder: "请选择关联会员",
        allowClear: true
    });
</script>


</body>

</html>
